<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>ta blogs</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="#数据类型1.数值型2.字符型3.逻辑型4.复数型5.特殊值 ###1.数值型就是数字。123&amp;gt; x&amp;lt;-7&amp;gt; class(x)[1] &quot;numeric&quot; ###2.字符型使用单引号或者双引号括起来的就是字符123&amp;gt; x&amp;lt;-&quot;7&quot;&amp;gt; class(x)[1] &quot;character&quot; ###3.逻辑型12345&amp;gt; x&amp;lt;-T#真(T,TRUE)假(F,FAL">
<meta property="og:type" content="website">
<meta property="og:title" content="ta blogs">
<meta property="og:url" content="http://yoursite.com/works/R语言入门基础一.html">
<meta property="og:site_name" content="ta blogs">
<meta property="og:description" content="#数据类型1.数值型2.字符型3.逻辑型4.复数型5.特殊值 ###1.数值型就是数字。123&amp;gt; x&amp;lt;-7&amp;gt; class(x)[1] &quot;numeric&quot; ###2.字符型使用单引号或者双引号括起来的就是字符123&amp;gt; x&amp;lt;-&quot;7&quot;&amp;gt; class(x)[1] &quot;character&quot; ###3.逻辑型12345&amp;gt; x&amp;lt;-T#真(T,TRUE)假(F,FAL">
<meta property="og:updated_time" content="2017-09-08T07:31:42.526Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="ta blogs">
<meta name="twitter:description" content="#数据类型1.数值型2.字符型3.逻辑型4.复数型5.特殊值 ###1.数值型就是数字。123&amp;gt; x&amp;lt;-7&amp;gt; class(x)[1] &quot;numeric&quot; ###2.字符型使用单引号或者双引号括起来的就是字符123&amp;gt; x&amp;lt;-&quot;7&quot;&amp;gt; class(x)[1] &quot;character&quot; ###3.逻辑型12345&amp;gt; x&amp;lt;-T#真(T,TRUE)假(F,FAL">
  
    <link rel="alternative" href="/atom.xml" title="ta blogs" type="application/atom+xml">
  
  
    <link rel="icon" href="/img/www.ico">
  
  
      <link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.5.0/animate.min.css">
  
  <link rel="stylesheet" href="/css/style.css">
  <link rel="stylesheet" href="/font-awesome/css/font-awesome.min.css">
  <link rel="apple-touch-icon" href="/apple-touch-icon.png">
  
  
      <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  
  <!-- 加载特效 -->
    <script src="/js/pace.js"></script>
    <link href="/css/pace/pace-theme-flash.css" rel="stylesheet" />
  <script>
      var yiliaConfig = {
          rootUrl: '/',
          fancybox: true,
          animate: true,
          isHome: false,
          isPost: false,
          isArchive: false,
          isTag: false,
          isCategory: false,
          open_in_new: false
      }
  </script>
</head>
<body>
  <div id="container">
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
    <header id="header" class="inner">
        <a href="/" class="profilepic">
            
            <img lazy-src="/img/head.jpg" class="js-avatar">
            
        </a>

        <hgroup>
          <h1 class="header-author"><a href="/" title="Hi Mate">昵称sch</a></h1>
        </hgroup>

        
        
        
            <div id="switch-btn" class="switch-btn">
                <div class="icon">
                    <div class="icon-ctn">
                        <div class="icon-wrap icon-house" data-idx="0">
                            <div class="birdhouse"></div>
                            <div class="birdhouse_holes"></div>
                        </div>
                        <div class="icon-wrap icon-ribbon hide" data-idx="1">
                            <div class="ribbon"></div>
                        </div>
                        
                        <div class="icon-wrap icon-link hide" data-idx="2">
                            <div class="loopback_l"></div>
                            <div class="loopback_r"></div>
                        </div>
                        
                        
                        <div class="icon-wrap icon-me hide" data-idx="3">
                            <div class="user"></div>
                            <div class="shoulder"></div>
                        </div>
                        
                    </div>
                    
                </div>
                <div class="tips-box hide">
                    <div class="tips-arrow"></div>
                    <ul class="tips-inner">
                        <li>菜单</li>
                        <li>标签</li>
                        
                        <li>友情链接</li>
                        
                        
                        <li>关于我</li>
                        
                    </ul>
                </div>
            </div>
        

        <div id="switch-area" class="switch-area">
            <div class="switch-wrap">
                <section class="switch-part switch-part1">
                    <nav class="header-menu">
                        <ul>
                        
                            <li><a href="/Home">博客首页</a></li>
                        
                            <li><a href="/works">所有博客</a></li>
                        
                            <li><a href="/about">留言打卡</a></li>
                        
                            <li><a href="/FrontEndGuide">前端导航</a></li>
                        
                        </ul>
                    </nav>
                    <nav class="header-nav">
                        <ul class="social">
                            
                                <a class="fl mail" target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=F2R0f2R-YldxeG96dn57OXR4eg" title="mail">mail</a>
                            
                                <a class="fl github" target="_blank" href="https://github.com/nichengsch" title="github">github</a>
                            
                                <a class="fl zhihu" target="_blank" href="#" title="zhihu">zhihu</a>
                            
                                <a class="fl weibo" target="_blank" href="#" title="weibo">weibo</a>
                            
                                <a class="fl google" target="_blank" href="#" title="google">google</a>
                            
                                <a class="fl twitter" target="_blank" href="#" title="twitter">twitter</a>
                            
                                <a class="fl linkedin" target="_blank" href="#" title="linkedin">linkedin</a>
                            
                        </ul>
                    </nav>
                </section>
                
                
                <section class="switch-part switch-part2">
                    <div class="widget tagcloud" id="js-tagcloud">
                        
                    </div>
                </section>
                
                
                
                <section class="switch-part switch-part3">
                    <div id="js-friends">
                    
                      <a target="_blank" class="main-nav-link switch-friends-link" href="http://nichengsch.github.io/">name</a>
                    
                    </div>
                </section>
                

                
                
                <section class="switch-part switch-part4">
                
                    <div id="js-aboutme">喜欢风，喜欢那个妹子，不喜欢高雅活动</div>
                </section>
                
            </div>
        </div>
    </header>                
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
      <div class="overlay">
          <div class="slider-trigger"></div>
          <h1 class="header-author js-mobile-header hide"><a href="/" title="Me">昵称sch</a></h1>
      </div>
    <div class="intrude-less">
        <header id="header" class="inner">
            <a href="/" class="profilepic">
                
                    <img lazy-src="/img/head.jpg" class="js-avatar">
                
            </a>
            <hgroup>
              <h1 class="header-author"><a href="/" title="Me">昵称sch</a></h1>
            </hgroup>
            
            <nav class="header-menu">
                <ul>
                
                    <li><a href="/Home">博客首页</a></li>
                
                    <li><a href="/works">所有博客</a></li>
                
                    <li><a href="/about">留言打卡</a></li>
                
                    <li><a href="/FrontEndGuide">前端导航</a></li>
                
                <div class="clearfix"></div>
                </ul>
            </nav>
            <nav class="header-nav">
                <div class="social">
                    
                        <a class="mail" target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=F2R0f2R-YldxeG96dn57OXR4eg" title="mail">mail</a>
                    
                        <a class="github" target="_blank" href="https://github.com/nichengsch" title="github">github</a>
                    
                        <a class="zhihu" target="_blank" href="#" title="zhihu">zhihu</a>
                    
                        <a class="weibo" target="_blank" href="#" title="weibo">weibo</a>
                    
                        <a class="google" target="_blank" href="#" title="google">google</a>
                    
                        <a class="twitter" target="_blank" href="#" title="twitter">twitter</a>
                    
                        <a class="linkedin" target="_blank" href="#" title="linkedin">linkedin</a>
                    
                </div>
            </nav>
        </header>                
    </div>
</nav>
      <div class="body-wrap"><article id="page-" class="article article-type-page" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/works/R语言入门基础一.html" class="article-date">
      <time datetime="2017-09-08T07:37:17.378Z" itemprop="datePublished">2017-09-08</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
    <div class="article-entry" itemprop="articleBody">
      
          
              <style>
    .article-meta {
        display: none;
    }
    #container .article .article-title {
        padding-right: 0;
    }
    .article-header {
        padding: 0;
        padding-top: 26px;
        border-left: none;
        text-align: center;
    }
    .article-header:hover {
        border-left: none;
    }
    .article-title {
        font-size: 1.6em
    }
    .article-meta {
        display: none;
    }
    .article-entry hr {
        margin: 0;
    }
    #container .article-info-post.article-info {
      display: none;
      }
    #container .article .article-title {
    padding: 0;
    }
</style>


          
        <p>#数据类型<br>1.数值型2.字符型3.逻辑型4.复数型5.特殊值</p>
<p>###1.数值型<br>就是数字。<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="meta">&gt;</span><span class="bash"> x&lt;-7</span></div><div class="line"><span class="meta">&gt;</span><span class="bash"> class(x)</span></div><div class="line">[1] "numeric"</div></pre></td></tr></table></figure></p>
<p>###2.字符型<br>使用单引号或者双引号括起来的就是字符<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="meta">&gt;</span><span class="bash"> x&lt;-<span class="string">"7"</span></span></div><div class="line"><span class="meta">&gt;</span><span class="bash"> class(x)</span></div><div class="line">[1] "character"</div></pre></td></tr></table></figure></p>
<p>###3.逻辑型<br><figure class="highlight subunit"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">&gt; x&lt;-T#真(T,TRUE)假(F,FALSE)</div><div class="line">&gt; class(x)</div><div class="line">[1] "logical"</div><div class="line">&gt; x&lt;-True</div><div class="line"><span class="keyword">Error: </span>object 'True' not found</div></pre></td></tr></table></figure></p>
<p>###4.复数型<br><figure class="highlight lsl"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">&gt; x&lt;- <span class="number">7</span>+<span class="number">7</span>i</div><div class="line">&gt; class(x)</div><div class="line">[<span class="number">1</span>] <span class="string">"complex"</span></div></pre></td></tr></table></figure></p>
<p>###5.特殊值<br><figure class="highlight r"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">指<span class="literal">Inf</span>，<span class="literal">NA</span>，<span class="literal">NaN</span></div><div class="line"><span class="literal">Inf</span>：infinite无穷大的意思，还有-<span class="literal">Inf</span></div><div class="line"><span class="literal">NA</span>：not available，表示缺失值或者<span class="literal">NULL</span></div><div class="line"><span class="literal">NaN</span>：计算产生的没意义的结果，not a number</div></pre></td></tr></table></figure></p>
<p>#数据结构<br>1.向量2.矩阵3.数组4.因子5.数据框6.列表</p>
<p>#VECTOR</p>
<p>##创建vector</p>
<figure class="highlight clean"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div></pre></td><td class="code"><pre><div class="line">	days_vector &lt;- c(<span class="string">"Monday"</span>, <span class="string">"Tuesday"</span>, <span class="string">"Wednesday"</span>, <span class="string">"Thursday"</span>, <span class="string">"Friday"</span>)</div><div class="line">	days_win_vector&lt;-c(<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>,<span class="number">4</span>,<span class="number">5</span>)</div><div class="line">	days_win2_vector&lt;-c(<span class="number">1</span>:<span class="number">5</span>)</div><div class="line">	days_win3_vector&lt;-<span class="number">1</span>:<span class="number">5</span></div><div class="line">```	</div><div class="line"></div><div class="line"></div><div class="line">##命名</div><div class="line"></div><div class="line">`names(days_win_vector)&lt;-days_vector`</div><div class="line"></div><div class="line">##查看属性</div><div class="line">`str(days_win_vector)`</div><div class="line"></div><div class="line"></div><div class="line">##选取子集</div></pre></td></tr></table></figure>
<p>###by number &amp;反选<br>days_win_vector[1]<br>days_win_vector[c(1,2)]<br>days_win_vector[-1]<br>days_win_vector[-c(1,2)]</p>
<p>###by names<br>days_win_vector[“Monday”]<br>days_win_vector[c(“Monday”,”Tuesday”)]</p>
<p>###by 条件</p>
<p>####布尔值<br>days_win_vector&gt;3<br>days_vector!=”Monday”</p>
<p>days_win_vector[days_win_vector&gt;3]<br>subset(days_win_vector,days_win_vector&gt;3)<br>days_vector[days_vector!=”Monday”]<br>subset(days_vector,days_vector!=”Monday”)<br>days_win_vector[days_win_vector&gt;3&amp;days_win_vector<5] <figure="" class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"></div><div class="line"><span class="meta">#</span><span class="bash"><span class="comment">#其它操作</span></span></div></pre></td></tr></table></5]></p>
<p>###获取向量长度<br>length(days_win_vector)</p>
<p>###获取均值，最大，最小，和，标准差<br>mean(days_win_vector)<br>max(days_win_vector)<br>min(days_win_vector)<br>sum(days_win_vector)<br>sd(days_win_vector)</p>
<p>###<br>x&lt;-c(1,2,4,3,7,5,4)<br>sort(x,decreasing = T)<br>sort(x, decreasing = FALSE)<br><figure class="highlight"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line"></div><div class="line"></div><div class="line">##向量中的强制转换原则</div><div class="line">logical &lt; numeric &lt; character</div></pre></td></tr></table></figure></p>
<blockquote>
<p>x&lt;-c(T,T,F,T)<br>str(x)<br> logi [1:4] TRUE TRUE FALSE TRUE<br>x[2]&lt;-2<br>x<br>[1] 1 2 0 1<br>str(x)<br> num [1:4] 1 2 0 1<br>x[1]&lt;-“1”<br>str(x)<br> chr [1:4] “1” “2” “0” “1”<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line"></div><div class="line"><span class="meta">#</span><span class="bash">MATRIX</span></div><div class="line"></div><div class="line"><span class="meta">#</span><span class="bash"><span class="comment">#创建</span></span></div></pre></td></tr></table></figure></p>
</blockquote>
<p>x&lt;-matrix(data = NA, nrow = 1, ncol = 1, byrow = FALSE,<br>       dimnames = NULL)</p>
<p>data&lt;-1:15<br>cn&lt;-c(“a”,”b”,”c”,”d”,”e”)<br>rn&lt;-c(“c1”,”c2”,”c3”)<br>mymatrix&lt;-matrix(data = data,nrow = 3,ncol = 5,dimnames = list(rn,cn))<br><figure class="highlight clean"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">##查看属性</div><div class="line">`str(mymatrix)`</div><div class="line"></div><div class="line">##选取子集</div></pre></td></tr></table></figure></p>
<p>mymatrix[1,]<br>mymatrix[,1]<br>mymatrix[1,c(2,3)]<br>mymatrix[-1,]<br><figure class="highlight"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"></div><div class="line"></div><div class="line"></div><div class="line">#数据框</div><div class="line">##创建</div></pre></td></tr></table></figure></p>
<p>mydata&lt;-data.frame(col1, col2, col3,…)</p>
<p>x&lt;-c(1, 2, 3)<br>y&lt;-c(“large”, “median”, “small”)<br>z&lt;-c(NaN, Inf, 5)<br>mydata&lt;-data.frame(x, y, z)<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span><span class="bash"><span class="comment">#查看属性</span></span></div></pre></td></tr></table></figure></p>
<p>str(mydata)<br>is.data.frame(mydata)<br>names(mydata)<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span><span class="bash"><span class="comment">#选取子集</span></span></div></pre></td></tr></table></figure></p>
<p>mydata[1,2]<br>mydata[1,]<br>mydata[,2]</p>
<p>mydata$x<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"></div><div class="line"><span class="meta">#</span><span class="bash"><span class="comment">#总想加点什么</span></span></div></pre></td></tr></table></figure></p>
<p>md=mydata<br>md[,4]&lt;-c(4:6)<br>mydata$u&lt;-1<br>mydata$v&lt;-c(4,5,6)<br>w&lt;-c(9,0,0)<br>mydata$w&lt;-w<br><figure class="highlight clean"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div></pre></td><td class="code"><pre><div class="line">##要删的话</div><div class="line">`mydata$w&lt;-NULL`</div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line">###其他。提取子集方法，重新赋值。</div><div class="line"></div><div class="line"></div><div class="line">##重命名列名</div></pre></td></tr></table></figure></p>
<p>names(mydata)&lt;-c(“x”,”y” ,”h” ,”u”, “p”)<br>names(mydata)[names(mydata) == “y”] = c(“fff”)<br>names(mydata)[4] = c(“a”)<br><figure class="highlight"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"></div><div class="line"></div><div class="line">#任务：</div></pre></td></tr></table></figure></p>
<p>#1.自己创建两个数据框（矩阵，向量），按列按行两种合并。观察并写下笔记</p>
<p>#2.记录整理is.datatype,as.datatype类型函数，写笔记。</p>
<p>#3.查看rnrom()函数，并使用它做一下基础的散点图，直方图，密度图。笔记。</p>
<p>#4.以上都不需要library()其他包。</p>
<p>#5.下次会说明factor，并讲述基础图的做法，以及package的安装方法，如果想看看的话，可以看看这个<a href="http://blog.csdn.net/BOOMBOY/article/details/77477181" target="_blank" rel="external">http://blog.csdn.net/BOOMBOY/article/details/77477181</a><br><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">```</div><div class="line"></div><div class="line"><span class="meta">#</span><span class="bash">快捷键：1.清屏：Ctrl+L  2.执行脚本：Ctrl+R  3.删除当前位置到行尾：Ctrl+K  </span></div><div class="line"><span class="meta">#</span><span class="bash">4.删除当前行所有： Ctrl+U   5.复制黏贴正常使用</span></div><div class="line"><span class="meta">#</span><span class="bash">6.和linux 相同的  Tab可以补全，上下键调用历史</span></div><div class="line"></div><div class="line"></div><div class="line"><span class="meta">#</span><span class="bash">有用命令：<span class="built_in">history</span>()   ls()   rm(list=ls())  <span class="built_in">help</span>() setwd()  getwd()  help.start()</span></div></pre></td></tr></table></figure></p>

      
      
        <div class="page-reward">
          <p><a href="javascript:void(0)" onclick="dashangToggle()" class="dashang">赏</a></p>
          <div class="hide_box"></div>
          <div class="shang_box">
            <a class="shang_close" href="javascript:void(0)" onclick="dashangToggle()">×</a>
            <div class="shang_tit">
              <p>纯属好玩</p>
            </div>
            <div class="shang_payimg">
              <img src="/img/alipayimg.jpg" alt="扫码支持" title="扫一扫" />
            </div>
              <div class="pay_explain">扫码打赏，你说多少就多少</div>
            <div class="shang_payselect">
              
                <div class="pay_item checked" data-id="alipay">
                  <span class="radiobox"></span>
                  <span class="pay_logo"><img src="/img/alipay.png" alt="支付宝" /></span>
                </div>
              
              
                <div class="pay_item" data-id="wechat">
                  <span class="radiobox"></span>
                  <span class="pay_logo"><img src="/img/weixin.png" alt="微信" /></span>
                </div>
              
            </div>
            <div class="shang_info">
              <p>打开<span id="shang_pay_txt">支付宝</span>扫一扫，即可进行扫码打赏哦</p>
            </div>
          </div>
        </div>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
        <script type="text/javascript">
          $(".pay_item").click(function(){
            $(this).addClass('checked').siblings('.pay_item').removeClass('checked');
            var dataid=$(this).attr('data-id');
            $(".shang_payimg img").attr("src","/img/"+dataid+"img.jpg");
            $("#shang_pay_txt").text(dataid=="alipay"?"支付宝":"微信");
          });
          function dashangToggle(){
            
            $(".hide_box").fadeToggle();
            $(".shang_box").fadeToggle();
          }
        </script>
      
    </div>
    
  </div>
  
    


  
</article>



<div class="bdsharebuttonbox">
	<a href="#" class="fx fa-weibo bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
	<a href="#" class="fx fa-weixin bds_weixin" data-cmd="weixin" title="分享到微信"></a>
	<a href="#" class="fx fa-qq bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
	<a href="#" class="fx fa-facebook-official bds_fbook" data-cmd="fbook" title="分享到Facebook"></a>
	<a href="#" class="fx fa-twitter bds_twi" data-cmd="twi" title="分享到Twitter"></a>
	<a href="#" class="fx fa-linkedin bds_linkedin" data-cmd="linkedin" title="分享到linkedin"></a>
	<a href="#" class="fx fa-files-o bds_copy" data-cmd="copy" title="分享到复制网址"></a>
</div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>




    
        <div id="gitments"></div>
<script src="/js/gitment.browser.js"></script>
<script>
    var gitment = new Gitment({
      id: window.location.pathname,
      owner: '昵称sch',
      repo: 'nichengsch.github.io',
      oauth: {
        client_id: '',
        client_secret: '',
      },
    })
    gitment.render('gitments')
</script>
    





    <script>
        
    </script>
</div>
      <footer id="footer">
    <div class="outer">
        <div id="footer-info">
            <div class="footer-left">
                &copy; 2017 昵称sch
            </div>
            <div class="footer-right">
                <a href="http://hexo.io/" target="_blank">Hexo</a>  Theme <a href="https://github.com/luuman/hexo-theme-spfk" target="_blank">spfk</a> by luuman
            </div>
        </div>
        
            <div class="visit">
                
                    <span id="busuanzi_container_site_pv" style='display:none'>
                        <span id="site-visit" >mm到访数: 
                            <span id="busuanzi_value_site_uv"></span>
                        </span>
                    </span>
                
                
                    <span>, </span>
                
                
                    <span id="busuanzi_container_page_pv" style='display:none'>
                        <span id="page-visit">本页阅读量: 
                            <span id="busuanzi_value_page_pv"></span>
                        </span>
                    </span>
                
            </div>
        
    </div>
</footer>

    </div>
    <script src="https://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
<script src="/js/main.js"></script>

    <script>
        $(document).ready(function() {
            var backgroundnum = 24;
            var backgroundimg = "url(/background/bg-x.jpg)".replace(/x/gi, Math.ceil(Math.random() * backgroundnum));
            $("#mobile-nav").css({"background-image": backgroundimg,"background-size": "cover","background-position": "center"});
            $(".left-col").css({"background-image": backgroundimg,"background-size": "cover","background-position": "center"});
        })
    </script>





<div class="scroll" id="scroll">
    <a href="#"><i class="fa fa-arrow-up"></i></a>
    <a href="#comments"><i class="fa fa-comments-o"></i></a>
    <a href="#footer"><i class="fa fa-arrow-down"></i></a>
</div>
<script>
    $(document).ready(function() {
        if ($("#comments").length < 1) {
            $("#scroll > a:nth-child(2)").hide();
        };
    })
</script>

<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>

  <script language="javascript">
    $(function() {
        $("a[title]").each(function() {
            var a = $(this);
            var title = a.attr('title');
            if (title == undefined || title == "") return;
            a.data('title', title).removeAttr('title').hover(

            function() {
                var offset = a.offset();
                $("<div id=\"anchortitlecontainer\"></div>").appendTo($("body")).html(title).css({
                    top: offset.top - a.outerHeight() - 15,
                    left: offset.left + a.outerWidth()/2 + 1
                }).fadeIn(function() {
                    var pop = $(this);
                    setTimeout(function() {
                        pop.remove();
                    }, pop.text().length * 800);
                });
            }, function() {
                $("#anchortitlecontainer").remove();
            });
        });
    });
</script>


  </div>
</body>
</html>